/*
	File:		RapairBot.h
	Author:		Ben Feldmann
	Purpose:	Class to manage game RapairBot enemies
*/

#pragma once

#include "Enemy.h"
#include "Event.h"
#include "Animation.h"
#include "AnimationSystem.h"
class Room;
class Player;

class RepairBot : public Enemy 
{
public:
	RepairBot();

	int GetMax() {return maxHealth;}

	~RepairBot();

	void Update(float elapsed);

	void Render();

	bool CheckCollision(IEntity* base);

	void Attack();

	// Pure virtual method from IListener
	virtual void HandleEvent(Event* thisEvent);

	RECT GetRect();

	void SetMoveSoundID(int id)
	{
		moveSound = id;
	}

	void SetHealSoundID(int id)
	{
		healSound = id;
	}

	void SetAnimationID(int id)
	{
		repairer = *AnimationSystem::GetInstance()->GetAnimation(id);

		SetWidth(repairer.GetCollsionRect().right - repairer.GetCollsionRect().left);
		SetHeight(repairer.GetCollsionRect().bottom - repairer.GetCollsionRect().top);
	}

private:
	Player* target;
	Enemy* healme;
	Animation repairer;
	int maxHealth;
	int moveSound;
	int healSound;
};
